#!/usr/bin/env python3 
# -*- coding: UTF-8 -*-

'''
CSDN中的操作
by lina
'''
from src.gui.action import base_action
from src.gui.page import csdn_index
from src.gui.page import csdn_login

class Csdn(base_action.BaseAction):

	def __init__(self):
		super().__init__()
		self.csdn_index_pg = csdn_index.CsdnIndex()
		self.csdn_login_pg = csdn_login.CsdnLogin()

	'''
	选择账号密码方式登录
	by lina
	'''
	def into_userpwd_login(self):
		self.csdn_index_pg.link_to_login()
		self.csdn_login_pg.use_userpwd_login()

	'''
	输入错误的账号密码
	by lina
	'''
	def use_wrong_userpwd_login(self):
		username = self.demo_data.get_data_by_tag('username')
		password = self.demo_data.get_data_by_tag('password')
		self.csdn_login_pg.userpwd_login(username,password)



		






